import React, { Component } from 'react';
import { graphql, compose } from 'react-apollo';
import gql from 'graphql-tag';
import { Vibration, Text, View, StyleSheet, Alert, ScrollView, ActivityIndicator, TextInput } from 'react-native';
import { Icon, List, ListItem, Button, SearchBar } from 'react-native-elements';

class CheckerMainPage extends Component {
  static navigationOptions = ({navigation}) => {
    return {
      title: 'Bag Drop Off'
    };
  }
  render() {
    return (
      <ScrollView>
        <TextInput autoFocus
          style={{height: 40, borderColor: 'gray', borderWidth: 1}}
          onChangeText={(text) => this.setState({text})}/>
      </ScrollView>
    );
  }
}

export default compose(
  graphql(gql`
    mutation loadFactoryDropOffs($workerId:Int!) {
      loadFactoryDropOffs(workerId:$workerId) {
        id
        displayId
      }
    }
  `, {
    name: 'loadFactoryDropOffs',
    props: ({loadFactoryDropOffs}) => {
      return {
        loadFactoryDropOffs: (workerId) => loadFactoryDropOffs({variables:{workerId}})
      };
    }
  })
)(CheckerMainPage);

